home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Dialog validation & notification
- Sent: 9/18/96 4:08 PM
- Received: 9/18/96 4:08 PM
- From: kswenson@keypress.com (Kirk Swenson)
- Reply-To: ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List
-
-
- >I have started using the view architecture to implement my dialogs, and it
- >is well implemented. The one thing I found missing however, is a lack of
- >validation and/or notification mechanism when the user exits edit views via
- >tabbing, clicking and okaying the dialog. Is this feature going to be a
- >part of ODF2? Or is there something I need to implement myself to handle
- >this problem?
-
- I worked around this limitation by creating a derived class of FW_CEditView
- (KCP_CEditViewNotifier) which overrides DeactivateTarget() to notify its
- dependents whenever it ceases to be the target. One could also override
- ActivateTarget() to cache a copy of the text and then only notify in
- DeactivateTarget() if the text actually changed. The required code is
- straightforward, but I can send it to you if desired (or post it if there
- is wider interest). FW_CEditView already inherits from FW_MNotifier, which
- suggests that the ODF team was intending to add notification but didn't get
- around to it. ODF 2 may well make this workaround obsolete in the next
- week.
-
- Kirk Swenson
- Senior Software Engineer
- Key Curriculum Press
- kswenson@keypress.com